package com.hangxintong.jpa;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;

public interface InformationRepository extends JpaRepository<LmInformation, String>, JpaSpecificationExecutor<LmInformation> {

    Page<LmInformation> findBySjrId(Integer id, Pageable pageable);

    Page<LmInformation> findBySjrIdAndCate(Integer id, Integer cate, Pageable pageable);

    List<LmInformation> findBySjrIdAndStatus(Integer id, Integer status);

    @Override
    Optional<LmInformation> findById(String s);

    List<LmInformation> findByPidAndFjrId(String id, Integer sjrId);

    Page<LmInformation> findByPid(String id, Pageable pageable);
}
